package store.lunangangster.bpmn.converter;

import javax.xml.stream.XMLStreamReader;
import store.lunangangster.bpmn.model.BpmnModel;
import store.lunangangster.bpmn.model.InclusiveGateway;
import store.lunangangster.bpmn.util.BpmnXmlUtil;

public class InclusiveGatewayConverter extends GatewayConverter {

  @Override
  protected InclusiveGateway convertToElement(XMLStreamReader xsr, BpmnModel model) throws Exception {
    InclusiveGateway inclusiveGateway = new InclusiveGateway();
    BpmnXmlUtil.addXmlLocation(xsr, inclusiveGateway);
    parseGatewayAttribute(xsr, inclusiveGateway);
    parseChildElement(xsr, inclusiveGateway, getTargetName(), model);
    return inclusiveGateway;
  }

  @Override
  public String getTargetName() {
    return ELEMENT_GATEWAY_INCLUSIVE;
  }
}
